Skip to content

Comments

fix(icm20948): Setting bit in wrong register / typo#606

Merged
finger563 merged 1 commit intomainfrom
fix/605-icm20948-config
Feb 21, 2026
Merged

fix(icm20948): Setting bit in wrong register / typo#606
finger563 merged 1 commit intomainfrom
fix/605-icm20948-config

Conversation

@finger563
Copy link
Contributor

Description

  • Set bit in GYRO_CONFIG_1 instead of GYRO_CONFIG_2 to enable gyro DLPF.

Motivation and Context

Closes #605

How has this been tested?

  • Build the example

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

Copilot AI review requested due to automatic review settings February 21, 2026 22:24
@finger563 finger563 self-assigned this Feb 21, 2026
@github-actions
Copy link

✅Static analysis result - no issues found! ✅

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in the ICM20948 component where the gyroscope digital low-pass filter (DLPF) enable bit was being set in the wrong register. The function set_gyroscope_dlpf_enabled was writing to GYRO_CONFIG_2 instead of GYRO_CONFIG_1, which prevented the DLPF from being enabled and sometimes caused errors.

Changes:

  • Corrected register reference in set_gyroscope_dlpf_enabled() from GYRO_CONFIG_2 to GYRO_CONFIG_1 to match the datasheet specification and existing code comment

@finger563 finger563 merged commit e95cd45 into main Feb 21, 2026
109 of 110 checks passed
@finger563 finger563 deleted the fix/605-icm20948-config branch February 21, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

icm20948 incorrect register for gyro DLPF

1 participant